package com.suxin.builder;

import java.net.URI;

/**
 * @author Tang
 * @classname AbstractBuilder
 * @description [  ]
 * @date 2022/9/21 16:34
 */
public abstract class AbstractBuilder<T extends AbstractBuilder<T>> implements Buildable<Route> {

    protected String id;

    protected URI uri;

    public T id(String id) {
        this.id = id;
        return getThis();
    }

    public T uri(URI uri) {
        this.uri = uri;
        return getThis();
    }

    @Override
    public Route builder() {
        return new Route(id,uri);
    }

    public abstract T getThis();

}